home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1988 October
/
Ahoy_Magazine_88-10_1988_Double_L.d64
/
Later Date
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
543b
|
19 lines
0 print"[147]":poke53280,6:poke53281,0
1 rem ==================================
2 rem commodares problem #52-1 :
3 rem later date
4 rem solution by
5 rem leslie walden
6 rem ==================================
10 for n=1 to 3: read a$,b$
20 gosub 50: next n: end
30 data 03/08/88, 09/16/74, 01/02/03, 01/02/04
40 data 08/10/80, 08/10/80
50 av$=right$(a$,2) + left$(a$,2) + mid$(a$,4,2)
60 bv$=right$(b$,2) + left$(b$,2) + mid$(b$,4,2)
70 if av$=bv$ then c$="the same as "
80 if av$<bv$ then c$="earlier than "
90 if av$>bv$ then c$="later than "
100 print a$; " is "; c$; b$; "."
110 return